#define TEMU_LOG asm volatile(".word 0x50000000");
struct Matrix   {int a[2][2];};
int main(){
    struct Matrix m1;m1.a[0][0] = 1;m1.a[0][1] = 2;m1.a[1][0] = 3;m1.a[1][1] = 4;
    struct Matrix m2;m2.a[0][0] = 4;m2.a[0][1] = 3;m2.a[1][0] = 2;m2.a[1][1] = 1;
    struct Matrix m3;
    m3.a[0][0] = ((m1.a[0][0] * m2.a[0][0]) + (m1.a[0][1] * m2.a[1][0]));
    m3.a[0][1] = ((m1.a[0][0] * m2.a[0][1]) + (m1.a[0][1] * m2.a[1][1]));
    m3.a[1][0] = ((m1.a[1][0] * m2.a[0][0]) + (m1.a[1][1] * m2.a[1][0]));
    m3.a[1][1] = ((m1.a[1][0] * m2.a[0][1]) + (m1.a[1][1] * m2.a[1][1]));
    if(m3.a[0][0] != 8) goto bad;
    TEMU_LOG
    if(m3.a[0][1] != 5) goto bad;
    TEMU_LOG
    if(m3.a[1][0] != 20) goto bad;
    TEMU_LOG
    if(m3.a[1][1] != 13) goto bad;
    TEMU_LOG
    goto good;
bad:
    asm volatile (".word 0x4c000000");
good:
    asm volatile (".word 0x4a000000");
}
